﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class YoozooGameplayRTSProtoBattleFormationCfgWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg);
			Utils.BeginObjectRegister(type, L, translator, 0, 0, 7, 7);
			
			
			
			Utils.RegisterFunc(L, Utils.GETTER_IDX, "formationType", _g_get_formationType);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "soldierNum", _g_get_soldierNum);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "modelNum", _g_get_modelNum);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "fixedSoldierID", _g_get_fixedSoldierID);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "soldierLocation", _g_get_soldierLocation);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "battleSoldierLocation", _g_get_battleSoldierLocation);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "formationPositionIndex", _g_get_formationPositionIndex);
            
			Utils.RegisterFunc(L, Utils.SETTER_IDX, "formationType", _s_set_formationType);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "soldierNum", _s_set_soldierNum);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "modelNum", _s_set_modelNum);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "fixedSoldierID", _s_set_fixedSoldierID);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "soldierLocation", _s_set_soldierLocation);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "battleSoldierLocation", _s_set_battleSoldierLocation);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "formationPositionIndex", _s_set_formationPositionIndex);
            
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
			
			
            
			
			
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				
				if (LuaAPI.lua_gettop(L) == 1)
				{
				    translator.Push(L, default(Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg));
			        return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg constructor!");
            
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				
				if (LuaAPI.lua_gettop(L) == 0)
				{
				    translator.Push(L, default(Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg));
			        return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg constructor!");
            
        }

        
		
        
		
        
        
        
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_formationType(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.formationType);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_soldierNum(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.soldierNum);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_modelNum(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.modelNum);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_fixedSoldierID(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.fixedSoldierID);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_soldierLocation(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                translator.Push(L, gen_to_be_invoked.soldierLocation);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_battleSoldierLocation(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                translator.Push(L, gen_to_be_invoked.battleSoldierLocation);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_formationPositionIndex(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.formationPositionIndex);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_formationType(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                gen_to_be_invoked.formationType = LuaAPI.xlua_tointeger(L, 2);
            
                translator.Update(L, 1, gen_to_be_invoked);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_soldierNum(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                gen_to_be_invoked.soldierNum = LuaAPI.xlua_tointeger(L, 2);
            
                translator.Update(L, 1, gen_to_be_invoked);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_modelNum(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                gen_to_be_invoked.modelNum = LuaAPI.xlua_tointeger(L, 2);
            
                translator.Update(L, 1, gen_to_be_invoked);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_fixedSoldierID(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                gen_to_be_invoked.fixedSoldierID = LuaAPI.xlua_tointeger(L, 2);
            
                translator.Update(L, 1, gen_to_be_invoked);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_soldierLocation(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                gen_to_be_invoked.soldierLocation = (System.Collections.Generic.List<Yoozoo.Gameplay.RTS.Proto.SoldierLocation>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<Yoozoo.Gameplay.RTS.Proto.SoldierLocation>));
            
                translator.Update(L, 1, gen_to_be_invoked);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_battleSoldierLocation(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                gen_to_be_invoked.battleSoldierLocation = (System.Collections.Generic.List<Yoozoo.Gameplay.RTS.Proto.SoldierLocation>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<Yoozoo.Gameplay.RTS.Proto.SoldierLocation>));
            
                translator.Update(L, 1, gen_to_be_invoked);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_formationPositionIndex(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                Yoozoo.Gameplay.RTS.Proto.BattleFormationCfg gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
                gen_to_be_invoked.formationPositionIndex = LuaAPI.xlua_tointeger(L, 2);
            
                translator.Update(L, 1, gen_to_be_invoked);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
		
		
		
		
    }
}
